﻿using System.Data;
using MaLu.Data;
using MaLu.Common;

namespace MaluJg.web.PovertyIn
{
    public partial class UVSick : PUserControl
    {

        public void LoadData()
        {

            DataTable dt = SqlHelper.Instance.ExecuteDataTable(Provider, @"SELECT *  FROM [SSick] where id=" + RecordID);
            if (dt.Rows.Count > 0)
            {

                DataRow dr = dt.Rows[0];
                tbYear.Text = dr["Year"].ToString();
                tbName.Text = dr["Name"].ToString();
                tbAge.Text = dr["age"].ToString();
                tbDistrict.Text = dr["districtMoney"].ToString();
                tbTown.Text = dr["townMoney"].ToString();
                tbDept.Text = dr["dept"].ToString();
                tbSickName.Text = dr["SickName"].ToString();
                tbAppliedMoney.Text = dr["AppliedMoney"].ToString();

                tbFamily.Text = dr["IsTownFamliy"].ToString() == "是" ? "城镇低收入" : "" + " " + dr["IsVillageFamliy"].ToString() == "是" ? "农村低收入" : "";
                tbYiBao.Text = dr["IsTownMedical"].ToString() == "是" ? "城镇医保" : "" + " " + dr["IsVillageMedical"].ToString() == "是" ? "合作医疗" : "";
                tbVillage.Text = dr["BelongTo"].ToString();
                tbMonth.Text = dr["month"].ToString();
                tbGendar.Text = dr["gender"].ToString();

            }
        }
    }
}